<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery.min-1.8.js"></script>
		<style type="text/css">
			div{
				width: 300px;
				height: 500px;
				outline: 1px red solid;
				overflow: auto;
			}
		</style>
	</head>
	<body>
		<p>1----scroll()-----页面滚动监听，也可用在div中</p>
		<p>2----resize()-----页面宽度监听，只能用在window中监听页面宽度</p>
		<h3>0</h3>
		<div>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
			<p>0000000000000</p>
		</div>
		
		
		<script type="text/javascript">
			$('div').scroll(function(){
				$('h3').html($('div').scrollTop())
			})
		</script>
		
		
	</body>
</html>
